import 'package:flutter/cupertino.dart';

class _Todo {
  String name;
  List<String> data;

  _Todo(this.name, this.data);
}

class NTodoList with ChangeNotifier {
  List<_Todo> _list = <_Todo>[];

  NTodoList() {
    reload();
  }


  List<_Todo> get list => _list;

  void finished(int type, index) {
    if (_list[type] != null) {
      _list[type].data.removeAt(index);
      notifyListeners();
    }
  }

  void reload() {
    _list = <_Todo>[
      _Todo("今天", [
        "VSP搭建",
        "Politeia搭建",
        "查阅智能合约咨询",
        "查阅智能合约咨询查阅智能合约咨询查阅智能合约咨询查阅智能合约咨询"
      ]),
      _Todo("公司", [
        "搭建网站",
        "更新证书",
      ]),
    ];
  }
}
